package zifuchuan;

public class _07旋转词 {
    //给定两个字符串s1和s2，要求判定s2是否能够通过s1做循环移位得到字符串的包含
    //例如：给定s1：AABCD s2：CDAA，返回true
    //      给定s1=ABCD和s2=ACBD，返回false

    //将原串复制一份拼接起来，如果拼接后的串有目标串的子集存在，则返回true
    public static void main(String[] args) {
        String s1 = "AABCD";
        String s2 = "CDAA";
        StringBuilder stringBuilder = new StringBuilder(s1).append(s1);
        System.out.println(stringBuilder.toString().contains(s2));
    }
}
